﻿<UserControl x:Class="SoundSnippetWidget.SoundSnippet"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  >
    <UserControl.Resources>
        <Style TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <ContentPresenter Content="{TemplateBinding Button.Content}"  />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Key="Click">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.RenderTransform).(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.RenderTransform).(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Width="150" >
        <Grid.RowDefinitions>
            <RowDefinition Height="6"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="9"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="6" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="12" />
        </Grid.ColumnDefinitions>
        <Image Source="Resources\Sound_GUI.png" Grid.ColumnSpan="5" Grid.RowSpan="3" />
        <Button RenderTransformOrigin="0.5,0.5" Grid.Row="1" Grid.Column="1" Background="{x:Null}" Foreground="{x:Null}" BorderBrush="{x:Null}" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" Click="Button0_Click" Cursor="Hand">
            <Image Source="Resources\Sound_BTN01.png" />
            <Button.RenderTransform>
                <ScaleTransform ScaleX="1" ScaleY="1"  />
            </Button.RenderTransform>
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click" >
                    <BeginStoryboard Storyboard="{StaticResource ResourceKey=Click}" />
                </EventTrigger>
            </Button.Triggers>
        </Button>
        <Button RenderTransformOrigin="0.5,0.5" Grid.Row="1" Grid.Column="2" Background="{x:Null}" Foreground="{x:Null}" BorderBrush="{x:Null}" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave"  Click="Button1_Click" Cursor="Hand">
            <Image Source="Resources\Sound_BTN02.png" />
            <Button.RenderTransform>
                <ScaleTransform ScaleX="1" ScaleY="1"  />
            </Button.RenderTransform>
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click" >
                    <BeginStoryboard Storyboard="{StaticResource ResourceKey=Click}" />
                </EventTrigger>
            </Button.Triggers>
        </Button>
        <Button RenderTransformOrigin="0.5,0.5" Grid.Row="1" Grid.Column="3" Background="{x:Null}" Foreground="{x:Null}" BorderBrush="{x:Null}" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" Click="Button2_Click" Cursor="Hand">
            <Image Source="Resources\Sound_BTN03.png" />
            <Button.RenderTransform>
                <ScaleTransform ScaleX="1" ScaleY="1"  />
            </Button.RenderTransform>
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click" >
                    <BeginStoryboard Storyboard="{StaticResource ResourceKey=Click}" />
                </EventTrigger>
            </Button.Triggers>
        </Button>
    </Grid>
</UserControl>
